package com.cmj.entity;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class Result {

    private Map<String, Object> extend;
    private boolean success;
    private String msg;

    public Result(Object obj, boolean b) {
        HashMap<String,Object> map = new HashMap<>();
        map.put("data",obj);
        this.extend = map;
        this.success = b;
        this.msg = b ? "成功":"失败";
    }


    public void setExtend(Map<String, Object> extend) {
        this.extend = extend;
    }

    public Map<String, Object> getExtend() {
        return extend;
    }

    public void setSuccess(boolean success) {
        this.success = success;
    }

    public boolean getSuccess() {
        return success;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public String getMsg() {
        return msg;
    }

    public Result(Object obj, boolean success, String msg) {
        HashMap<String,Object> map = new HashMap<>();
        map.put("data",obj);
        this.extend = map;
        this.success = success;
        this.msg = msg;
    }

    public Result() {

    }
}
